#pragma once
#include "VisibleGameObject.h"
#include "InputManager.h"
#include "PlayerPaddle.h"
#include "AIPaddle.h"

class GameBall :
	public CollidableObject
{
public:
	GameBall();
	virtual ~GameBall();

	void Update(float elapsedTime);
	void Draw(sf::RenderWindow& window);
	void collideWith(CollidableObject* collisionObject);
	void ResetTime();
	float GetVelocityX() const;
	float GetVelocityY() const;
	void Pause(bool isPaused);

private:
	float _velocity;
	float _angle;
	float _elapsedTimeSinceStart;

	sf::Font _font;
	sf::Text _text;

	float LinearVelocityX(float angle) const;
	float LinearVelocityY(float angle) const;

	float _moveByX;
	float _moveByY;
};

